package com.lagou.edu.ctrl;

import com.lagou.api.UserService;
import com.lagou.edu.dao.AuthTokenDao;
import com.lagou.edu.pojo.AuthToken;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;

@Service
public class UserImpl implements UserService {

    @Autowired
    AuthTokenDao authTokenDao;


    @Override
    public Boolean token(String token) {
        return authTokenDao.exists(Example.of(new AuthToken().setToken(token)));

    }
}
